/**
 * related to neighborShopCell.ui
 * 
 * @Author : chenglm
 * @Timestamp : 2016-12-26
 */
var root=ui("$");
var helperOpen = require("helper/open");
var newshopView = ui("newshopView");
var shopLayout = ui("shopLayout");
var newlistdata = mm("do_ListData");
// 将ListData的数据赋给SegmentView
newshopView.bindItems(newlistdata);
root.setMapping({
	"shopLayout.tag":"id",
	"newfullLogo.source":"fullLogo",
	"shopNameLabel.text":"name",
	"shopResumeLabel.text":"resume",
	"newshopView.tag":"mallProductVoList",
	"newshopView.visible":"haspRoductImg"
});

root.on("dataRefreshed", function(){
	if(newshopView.visible){
		newlistdata.removeAll();
		var dataSet = JSON.parse(newshopView.tag);
		newlistdata.addData(dataSet);
		newshopView.refreshItems();
	}
});

shopLayout.on("touch", "", 300, function(data, e) {
	helperOpen.open("source://view/qshop/detail/main.ui",{shopId:shopLayout.tag});
});